package cn.theten52.demo.patterns.design.creation.factory.abstract1.update1;

import cn.theten52.demo.patterns.design.creation.factory.abstract1.BigCarBody;
import cn.theten52.demo.patterns.design.creation.factory.abstract1.CarBody;
import cn.theten52.demo.patterns.design.creation.factory.abstract1.CarColor;
import cn.theten52.demo.patterns.design.creation.factory.abstract1.RedCarColor;

/**
 * 带车灯的汽车工厂
 *
 * @author wangjin
 * @date 2020/12/27
 */
public class RoundCarLightFactory implements CarLightsFactory {
    /**
     * @return 车身
     */
    @Override
    public CarBody newCarBody() {
        return new BigCarBody();
    }

    /**
     * @return 车辆颜色
     */
    @Override
    public CarColor newCarColor() {
        return new RedCarColor();
    }

    /**
     * @return 车灯
     */
    @Override
    public CarLights newCarLights() {
        return new RoundCarLights();
    }
}
